package com.fyzk.activity.user.xiangxi;

import android.content.Context;
import android.content.Intent;

import com.fyzk.activity.lottery.basketball.JCLQFragmentActivityI;
import com.fyzk.activity.lottery.gaopin.AnHuiK3Activity;
import com.fyzk.activity.lottery.gaopin.GD11x5Activity;
import com.fyzk.activity.lottery.gaopin.GDKLSFActivity;
import com.fyzk.activity.lottery.gaopin.GXK3Activity;
import com.fyzk.activity.lottery.gaopin.JLK3Activity;
import com.fyzk.activity.lottery.gaopin.JSK3Activity;
import com.fyzk.activity.lottery.gaopin.KLSFActivity;
import com.fyzk.activity.lottery.gaopin.NXK3Activity;
import com.fyzk.activity.lottery.gaopin.SD11x5Activity;
import com.fyzk.activity.lottery.gaopin.SSCActivity;
import com.fyzk.activity.lottery.gaopin.XJ11x5Activity;
import com.fyzk.activity.lottery.jc.beidan.BeiDanActivity;
import com.fyzk.activity.lottery.jc.football.newJz.FootballFragmentActivityI;
import com.fyzk.activity.lottery.shuzicai.DLTActivity;
import com.fyzk.activity.lottery.shuzicai.FC3DActivity;
import com.fyzk.activity.lottery.shuzicai.PL3Activity;
import com.fyzk.activity.lottery.shuzicai.PL5Activity;
import com.fyzk.activity.lottery.shuzicai.QLCActivity;
import com.fyzk.activity.lottery.shuzicai.QXCActivity;
import com.fyzk.activity.lottery.shuzicai.SSQActivity;
import com.fyzk.activity.lottery.shuzicai.klpk.KLPKActivity;
import com.fyzk.activity.lottery.zc_new.OldFootballBQCActivity_New;
import com.fyzk.activity.lottery.zc_new.OldFootballJQCActivity_New;
import com.fyzk.activity.lottery.zc_new.OldFootballR9Activity_New;
import com.fyzk.activity.lottery.zc_new.OldFootballSFCActivity_New;
import com.fyzk.dialog.SureDialog;
import com.fyzk.utils.LotteryIDUtils;

/**
 * 继续购彩
 */
public class ContinueBuy {
    /**
     * 停售对话框
     */
    private static SureDialog sellStopDialog = null;

    public static boolean jiXu(Context context, int lotteryId) {
        Intent intent;
//		sellStopDialog = new SureDialog(context, R.style.MyDialog);
//		if (AppLotteryInfos.getSellType(lotteryId).equals("2")) {
//			showSellStopDialog("该彩种已停止销售！");
//			return false;
//		}
        switch (lotteryId) {
            case LotteryIDUtils.SSQ_LOTTERY_ID_INT:
                intent = new Intent(context, SSQActivity.class);
                break;
            case LotteryIDUtils.DLT_LOTTERY_ID_INT:
                intent = new Intent(context, DLTActivity.class);
                break;
            case LotteryIDUtils.PL5_LOTTERY_ID_INT:
                intent = new Intent(context, PL5Activity.class);
                break;
            case LotteryIDUtils.PL3_LOTTERY_ID_INT:
                intent = new Intent(context, PL3Activity.class);
                break;
            case LotteryIDUtils.FC3D_LOTTERY_ID_INT:
                intent = new Intent(context, FC3DActivity.class);
                break;
            case LotteryIDUtils.QXC_LOTTERY_ID_INT:
                intent = new Intent(context, QXCActivity.class);
                break;
            case LotteryIDUtils.JZDG_LOTTERY_ID_INT:
                // 竞猜足球单关
                intent = new Intent(context, FootballFragmentActivityI.class);
                intent.putExtra("isDan", true);
                break;
            case LotteryIDUtils.JZSPF_LOTTERY_ID_INT:
            case LotteryIDUtils.JZRFSPF_LOTTERY_ID_INT:
            case LotteryIDUtils.JZBF_LOTTERY_ID_INT:
            case LotteryIDUtils.JZBQC_LOTTERY_ID_INT:
            case LotteryIDUtils.JZZJQ_LOTTERY_ID_INT:
            case LotteryIDUtils.JZHH_LOTTERY_ID_INT:
                intent = new Intent(context, FootballFragmentActivityI.class);
                break;
            case LotteryIDUtils.ZCSFC_LOTTERY_ID_INT:
//			intent = new Intent(context, SFCActivity.class);
                intent = new Intent(context, OldFootballSFCActivity_New.class);
                break;
            case LotteryIDUtils.ZCRXJ_LOTTERY_ID_INT:
//			intent = new Intent(context, R9Activity.class);
                intent = new Intent(context, OldFootballR9Activity_New.class);
                break;
            case LotteryIDUtils.ZCJQC_LOTTERY_ID_INT:
//			intent = new Intent(context, JQCActivity.class);
                intent = new Intent(context, OldFootballJQCActivity_New.class);
                break;
            case LotteryIDUtils.ZCBQC_LOTTERY_ID_INT:
//			intent = new Intent(context, LCBQCActivity.class);
                intent = new Intent(context, OldFootballBQCActivity_New.class);
                break;
            case LotteryIDUtils.SD11XUAN5_LOTTERY_ID_INT:
                intent = new Intent(context, SD11x5Activity.class);
                break;
            case LotteryIDUtils.GD11XUAN5_LOTTERY_ID_INT:
                intent = new Intent(context, GD11x5Activity.class);
                break;
            case LotteryIDUtils.XJ11XUAN5_LOTTERY_ID_INT:
                intent = new Intent(context, XJ11x5Activity.class);
                break;
            case LotteryIDUtils.CQSSC_LOTTERY_ID_INT:
                intent = new Intent(context, SSCActivity.class);
                break;
            case LotteryIDUtils.NXK3_LOTTERY_ID_INT:
                intent = new Intent(context, NXK3Activity.class);
                break;
            case LotteryIDUtils.ANHUIK3_LOTTERY_ID_INT:
                intent = new Intent(context, AnHuiK3Activity.class);
                break;
            case LotteryIDUtils.JSK3_LOTTERY_ID_INT:
                intent = new Intent(context, JSK3Activity.class);
                break;
            case LotteryIDUtils.JLK3_LOTTERY_ID_INT:
                intent = new Intent(context, JLK3Activity.class);
                break;
            case LotteryIDUtils.GXK3_LOTTERY_ID_INT:
                intent = new Intent(context, GXK3Activity.class);
                break;
            case LotteryIDUtils.QLC_LOTTERY_ID_INT:
                intent = new Intent(context, QLCActivity.class);
                break;
            case LotteryIDUtils.KLSF_LOTTERY_ID_INT:
                intent = new Intent(context, KLSFActivity.class);
                break;
            case LotteryIDUtils.GDKLSF_LOTTERY_ID_INT:
                intent = new Intent(context, GDKLSFActivity.class);
                break;
            case LotteryIDUtils.JLSF_LOTTERY_ID_INT:
            case LotteryIDUtils.JLDXF_LOTTERY_ID_INT:
            case LotteryIDUtils.JLHH_LOTTERY_ID_INT:
            case LotteryIDUtils.JLRSF_LOTTERY_ID_INT:
            case LotteryIDUtils.JLSFC_LOTTERY_ID_INT:
                intent = new Intent(context, JCLQFragmentActivityI.class);
                break;
            case LotteryIDUtils.KLPK_LOTTERY_ID_INT:
                intent = new Intent(context, KLPKActivity.class);
                break;
            case LotteryIDUtils.DCSPF_LOTTERY_ID_INT:
            case LotteryIDUtils.DCBF_LOTTERY_ID_INT:
            case LotteryIDUtils.DCZJQ_LOTTERY_ID_INT:
            case LotteryIDUtils.DCBQC_LOTTERY_ID_INT:
            case LotteryIDUtils.DCSXDS_LOTTERY_ID_INT:
                intent = new Intent(context, BeiDanActivity.class);
                break;
            default:
//			AppToast.getToast().show("暂不支持此玩法");
                showSellStopDialog("暂不支持此玩法");
                return false;
        }

        context.startActivity(intent);
        return true;
    }

    public static boolean jiXu(Context context, String lotteryType) {
        int lotteryId = 0;
        try {
            lotteryId = Integer.parseInt(lotteryType);
        } catch (Exception e) {
            // TODO: handle exception
        }
        return jiXu(context, lotteryId);
    }

    /**
     * 暂停销售提示框
     */
    private static void showSellStopDialog(String str) {
        // TODO Auto-generated method stub

//		if(){
//
//		sellStopDialog.setTishiString1("");
//		sellStopDialog.setTishiString2(""+str);
//		sellStopDialog.setBtnSureString("确定");
////		sellStopDialog.setBtnCancelString("返回");
//		sellStopDialog.setBtnCancelVisibility(View.GONE);
//		sellStopDialog.setOnDialogOKCancleClickListener(new OnDialogOKCancleClickListener() {
//
//			@Override
//			public void onOKClick() {
//				// TODO Auto-generated method stub
//				sellStopDialog.dismiss();
//			}
//
//			@Override
//			public void onCancleClick() {
//				// TODO Auto-generated method stub
//
//			}
//		});
//		sellStopDialog.show();
    }
}
